#ifndef NETWORK_H
#define NETWORK_H
#include <QDataStream>
#include <QTcpSocket>

/*! \brief Network:
   A class that establishes a connection to
   the server.
   */
class Network
{
public:

    /*! networkInstance
   \brief  creates an instance of Network
   */
    static Network *networkInstance();

    /*! createConnection
   \brief  Makes a connection to server,
   then waits for socket connecect success or fail
   */
    void createConnection();

    /*! \var QTcpSocket tcpSocket
   \brief provides a TCP socket
  */
    QTcpSocket tcpSocket;

private:

    /*! Network
   \brief  Network constructor
   */
    Network();

    /*! Network Instance Pointer
   \brief  pointer of Network Instance
   */
    static Network *ntwkInstance_p;

};
#endif // NETWORK_H
